package demo1;

public class Test2 {
    public static void main(String[] args) throws CloneNotSupportedException {
        People people1=new People();
       People people2 = (People) people1.clone();
        System.out.println("通过people2修改前的结果");
        System.out.println(people1.cash.c); //60
        System.out.println(people2.cash.c); //60
        people2.cash.c=150;
        System.out.println("通过people2修改后的结果");
        System.out.println(people1.cash.c); //60
        System.out.println(people2.cash.c); //150
    }
}
